<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Village_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-village_id" data-rule="required" min="0" data-source="xiluhouse/rent/village/selectpage" class="form-control selectpage" name="row[village_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" min="0" data-source="xiluhouse/user/user/index" data-field="nickname" class="form-control selectpage" data-params='{"custom[userprofile.is_broker]":["in","1,2"]}' name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_no')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_no" class="form-control" name="row[house_no]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_public')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isPublicList" item="vo"}
                <label for="row[is_public]-{$key|htmlentities}"><input id="row[is_public]-{$key|htmlentities}" name="row[is_public]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('房屋信息')}:</label>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <span class="input-group-addon" >总价</span>
                <input aria-describedby="c-total_price" min="0" class="form-control" name="row[total_price]" type="text" value="0">
                <span class="input-group-addon" id="c-total_price">万元</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <span class="input-group-addon">单价</span>
                <input aria-describedby="c-price" min="0" class="form-control" name="row[price]" type="text" value="0">
                <span class="input-group-addon" id="c-price">元</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <span class="input-group-addon" id="c-face">{:__('Face')}</span>
                <input aria-describedby="c-face" class="form-control" name="row[face]" type="text" value="">
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <span class="input-group-addon" id="c-period">{:__('Period')}</span>
                <input aria-describedby="c-period" class="form-control" name="row[period]" type="text" value="">
            </div>
        </div>

    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('居室')}:</label>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <input aria-describedby="c-space" min="0" class="form-control" name="row[space]" type="number" value="0">
                <span class="input-group-addon" id="c-space">平</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <input aria-describedby="c-room_num" min="0" data-rule="integer,range(0~10)" class="form-control" name="row[room_num]" type="number" value="0">
                <span class="input-group-addon" id="c-room_num">室</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <input aria-describedby="c-ting_num" min="0" data-rule="integer,range(0~10)" class="form-control" name="row[ting_num]" type="number" value="0">
                <span class="input-group-addon" id="c-ting_num">厅</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-2">
            <div class="input-group">
                <input aria-describedby="c-wei_num" min="0" data-rule="integer,range(0~10)" class="form-control" name="row[wei_num]" type="number" value="0">
                <span class="input-group-addon" id="c-wei_num">卫</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('楼层')}:</label>
        <div class="col-xs-12 col-sm-4">
            <div class="input-group">
                <input aria-describedby="c-total_floor" min="0" data-rule="integer" class="form-control"
                       name="row[total_floor]" type="number" value="0">
                <span class="input-group-addon" id="c-total_floor">总层数</span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-4">
            <div class="input-group">
                <input aria-describedby="c-floor_num" min="0" data-rule="integer" class="form-control"
                       name="row[floor_num]" type="number" value="0">
                <span class="input-group-addon" id="c-floor_num">所在楼层</span>
            </div>
        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_elevator')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isElevatorList" item="vo"}
                <label for="row[is_elevator]-{$key|htmlentities}"><input id="row[is_elevator]-{$key|htmlentities}" name="row[is_elevator]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Purpose_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-purpose_id" min="0" data-rule="required" data-source="xiluhouse/market/purpose/selectpage" class="form-control selectpage" name="row[purpose_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Decoration_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-decoration_id" min="0" data-rule="required" data-source="xiluhouse/market/decoration/selectpage"
                   class="form-control selectpage" name="row[decoration_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_unique')}:</label>
        <div class="col-xs-12 col-sm-4">
            <div class="radio">
                {foreach name="isUniqueList" item="vo"}
                <label for="row[is_unique]-{$key|htmlentities}"><input id="row[is_unique]-{$key|htmlentities}" name="row[is_unique]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>
        </div>
        <div class="col-xs-12 col-sm-4">
            <div class="input-group">
                <span class="input-group-addon" >购买</span>
                <input aria-describedby="c-buy_years" min="0" data-rule="integer" class="form-control"
                       name="row[buy_years]" type="number" value="0">
                <span class="input-group-addon" id="c-buy_years">年</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parking_lot')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parking_lot" data-rule="required" min="0" class="form-control" name="row[parking_lot]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Property_right')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="propertyRightList" item="vo"}
                <label for="row[property_right]-{$key|htmlentities}"><input id="row[property_right]-{$key|htmlentities}" name="row[property_right]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('View_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="viewStatusList" item="vo"}
            <label for="row[view_status]-{$key|htmlentities}"><input id="row[view_status]-{$key|htmlentities}" name="row[view_status]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="textarea">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Room_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-room_images" class="form-control" size="50" name="row[room_images]" type="textarea">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-room_images" class="btn btn-danger faupload" data-input-id="c-room_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-room_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-room_images" class="btn btn-primary fachoose" data-input-id="c-room_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-room_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-room_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Video_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video_file" class="btn btn-danger faupload" data-input-id="c-video_file" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video_file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" min="0" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="stateList" item="vo"}
                <label for="row[state]-{$key|htmlentities}"><input id="row[state]-{$key|htmlentities}" name="row[state]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key|htmlentities}"><input id="row[status]-{$key|htmlentities}" name="row[status]" type="radio" value="{$key|htmlentities}" {in name="key" value="normal"}checked{/in} /> {$vo|htmlentities}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
